package com.study.service.impl;

import com.study.bean.vo.RecordVo;
import com.study.service.RecordService;
import com.study.util.ExcelUtils;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

public class ExcelSevice {
    private final RecordService  recordService = new RecordServiceImpl();
    public void exportExcel(HttpServletResponse resp) {

           List<RecordVo> list = recordService.selectAll();
            ExcelUtils.exportExcel(resp, list, RecordVo.class, "record.xls");

    }
}
